import { FC } from 'react';
import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons';
import { Tabs } from 'antd';
import EditorLib from '../EditorLib';
import './index.scss';
import Layer from '../Layer';

const LeftPanel: FC = () => {
  const tableComponent = {
    key: 'componentLib',
    label: (
      <span>
        <AppstoreOutlined />
        组件库
      </span>
    ),
    children: <EditorLib />,
  };

  const tableLayer = {
    key: 'layers',
    label: (
      <span>
        <BarsOutlined />
        图层
      </span>
    ),
    children: <Layer />,
  };

  const tableItems = [tableComponent, tableLayer];

  return <Tabs items={tableItems} defaultActiveKey="layers" />;
};

export default LeftPanel;
